package com.ali.service.impl;

import com.ali.dao.TransactionalFirstMapper;
import com.ali.entity.TransactionalFirst;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Slf4j
@Service
public class TransactionalFirstServiceImpl {
    @Resource
    private TransactionalFirstMapper transactionalFirstMapper;

    @Transactional
    public void save(String content) {
        log.info("save");

        TransactionalFirst transactionalFirst = new TransactionalFirst();
        transactionalFirst.setContent(content);
        transactionalFirstMapper.insert(transactionalFirst);
    }
}
